package com.sikaryofficial.system.api;

import com.sikaryofficial.common.core.constant.ServiceNameConstants;
import com.sikaryofficial.common.core.domain.R;
import com.sikaryofficial.system.api.factory.RemoteLogFallbackFactory;
import com.sikaryofficial.system.api.model.notice.NoticePageReq;
import com.sikaryofficial.system.api.model.notice.NoticeResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * 通知公告服务
 */
@FeignClient(contextId = "remoteNoticeService",
        path = "/notice/api",
        value = ServiceNameConstants.SYSTEM_SERVICE,
        fallbackFactory = RemoteLogFallbackFactory.class)
public interface RemoteNoticeService {

    /**
     * 分页查询通知公告
     * @param req
     * @return
     */
    @GetMapping("/listUserNotice")
    R<List<NoticeResp>> listUserNotice(@SpringQueryMap NoticePageReq req);
}
